home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Dots & Pixels
/
headers
/
port.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-29
|
2KB
|
94 lines
#pragma once
class port : public general
{
public:
~port();
void use() const;
void get_rect( Rect *rect) const;
void get_pixH( PixMapPtr *pix) const;
void copyfrom( const port &source, const short mode = srcCopy,
const RgnHandle maskRgn = 0) const;
void copyfrom( const port &source, const Rect &origRect, const Rect &destRect,
const short mode = srcCopy, const RgnHandle maskRgn = 0) const;
void copyfrom( const port &source, const Rect &origRect,
const short mode = srcCopy, const RgnHandle maskRgn = 0) const;
void copyfrom( const port &source, const port &mask,
const short mode = srcCopy, const RgnHandle maskRgn = 0) const;
void copyfrom( const port &source, const port &mask, const Rect &origRect,
const Rect &maskRect, const Rect &destRect,
const short mode = srcCopy, const RgnHandle maskRgn = 0) const;
void scroll( short dh, short dv) const;
PicHandle getPICT() const;
GWorldPtr getGWorld() const;
GDHandle getGDevice() const;
void cls_black() const;
void cls_white() const;
void invert() const;
void SetColorTable( short resID) const;
void SetColorTable( CTabHandle theColorTable) const;
protected:
static const port *currentport;
GWorldPtr myGWorldPtr;
GDHandle myGDHandle;
Rect myRect;
PixMapPtr myPix;
};
inline void port::get_rect( Rect *rect) const
{
*rect = myRect;
}
inline void port::get_pixH( PixMapPtr *pix) const
{
*pix = myPix;
}
inline void port::copyfrom( const port &source, const short mode, const RgnHandle maskRgn) const
{
use();
CopyBits( (BitMapPtr)(source.myPix), (BitMapPtr)myPix,
&(source.myRect), &myRect, mode, maskRgn);
}
inline GWorldPtr port::getGWorld() const
{
return myGWorldPtr;
}
inline GDHandle port::getGDevice() const
{
return myGDHandle;
}
inline void port::cls_black() const
{
use();
PaintRect( &myRect);
}
inline void port::cls_white() const
{
use();
EraseRect( &myRect);
}
inline void port::invert() const
{
use();
InvertRect( &myRect);
}